package com.cheer.enums;

/**
 * @author cheer
 */
public enum LotteryActTypeEnum {

    QUESTION(1, "在线问答"),
    INTEGRAL(2, "积分抽奖");

    private Integer code;
    private String message;

    LotteryActTypeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }
    public String getMessage() {
        return message;
    }

    public static LotteryActTypeEnum getByCode(Integer code) {
        for (LotteryActTypeEnum typeEnum : values()) {
            if (typeEnum.getCode().equals(code)) {
                return typeEnum;
            }
        }
        return null;
    }

}
